package com.siti.kindnessplatform.donate.biz;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.siti.kindnessplatform.donate.mapper.DonateMapper;
import com.siti.kindnessplatform.donate.vo.DonateVo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;


@Service
@Transactional
public class DonateBiz {

    @Resource
    private DonateMapper donateMapper;

    public PageInfo<DonateVo> getDonateInfo(Integer page, Integer pageSize) {
        PageHelper.startPage(page, pageSize);
        List<DonateVo> info = donateMapper.getDonateInfo();
        PageInfo<DonateVo> pageInfo = new PageInfo<>(info);
        return pageInfo;
    }

}
